package com.nets.pool;

import com.nets.util.LogUtil;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;
import org.quartz.impl.StdSchedulerFactory;

/**
 * author sig
 * since 2017/2/22
 */
public class QuartzPool {

    public static void init() {
        try {
            SchedulerFactory factory = new StdSchedulerFactory("config/quartz.properties");
            Scheduler scheduler = factory.getScheduler();
            scheduler.start();
        } catch (SchedulerException e) {
            LogUtil.console.error(e.getMessage(), e);
        }
    }
}
